//
//  NoDataView.swift
//  maosheng
//
//  Created by lxl on 2019/8/13.
//

import UIKit

class NoDataView: UIView {
    let noDataImg = UIImageView()
    let noDataLab = UILabel()

    override init(frame: CGRect) {
        super.init(frame: frame)
        configUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func configUI() -> Void {
        noDataImg.contentMode = .scaleAspectFit
//        noDataImg.backgroundColor = .red
        noDataImg.image = UIImage(named: "noData")
        self.addSubview(noDataImg)
        noDataImg.snp.makeConstraints { (make) in
            make.left.right.equalTo(0)
            make.width.equalTo(170)
            make.height.equalTo(127)
            make.top.equalTo(50)
        }
//        noDataLab
        self.addSubview(noDataLab)
        noDataLab.textAlignment = .center
        noDataLab.textColor = KYP_666666_COLOR
        noDataLab.font = UIFont(name: "PingFangSC-Regular", size: 13)
        noDataLab.snp.makeConstraints { (make) in
            make.top.equalTo(noDataImg.snp.bottom).offset(10)
            make.left.right.bottom.equalTo(0)
        }
    }

}
